/** */
package com.yzjs.common.base.entity;




import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yzjs.common.dto.LoginUserDTO;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @project: cps-ims-server
 * @author: wangjz 2018年8月21日上午11:22:46
 */
@Data
public class BasePojo<T> extends AbstractBasePojo {

	/** id的字符串形式 */
	@JsonIgnore
	private String objId;
	/**  id基本数据 */
	private T id ;
	/** 创建人id */

	private Integer createId;
	/** 创建人name */
	private String createName;
	/** 创建时间 */
	@JsonIgnore
	private LocalDateTime createDate;
	/**
	 * 修改人ID
	 */
	@JsonIgnore
	private Integer updateId;
	/**
	 * 修改人名称
	 */
	@JsonIgnore
	private String updateName;
	/**
	 * 修改时间
	 */
	@JsonIgnore
	private LocalDateTime updateDate;

	/** 查询：变动开始时间 */
	private String queryStartTime;
	/** 查询：变动结束时间 */
	private String queryEndTime;


	private Object params;
	private Boolean flag;

	private Boolean admin;
	private List<Object> postIds;

	private String updateBy;

	private List<Object> deptIds;

	private List<Object> roleIds;


	public List<Object> getRoleIds() {
		return roleIds;
	}

	public void setRoleIds(List<Object> roleIds) {
		this.roleIds = roleIds;
	}

	public List<Object> getDeptIds() {
		return deptIds;
	}

	public void setDeptIds(List<Object> deptIds) {
		this.deptIds = deptIds;
	}

	public List<Object> getPostIds() {
		return postIds;
	}

	public void setPostIds(List<Object> postIds) {
		this.postIds = postIds;
	}

	public Boolean getAdmin() {
		return admin;
	}

	public void setAdmin(Boolean admin) {
		this.admin = admin;
	}

	public Boolean getFlag() {
		return flag;
	}

	public void setFlag(Boolean flag) {
		this.flag = flag;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	/**
	 * 设置创建信息
	 *
	 * @param operator
	 * @author: wangjz 2018年8月24日下午3:25:51
	 */
	public void CreateInfo(LoginUserDTO operator) {
		this.setCreateId((Integer) operator.getId());
		this.setCreateName(operator.getName());
		this.setCreateDate(LocalDateTime.now());
		this.setUpdateDate(LocalDateTime.now());
	}

	/**
	 * 设置创建信息
	 *
	 * @param operator
	 * @author: wangjz 2018年8月24日下午3:25:51
	 */
	public void UpdateInfo(LoginUserDTO operator) {
		this.setUpdateId((Integer) operator.getId());
		this.setUpdateName(operator.getName());
		this.setUpdateDate(LocalDateTime.now());
	}

	public Object getParams() {
		return params;
	}

	public void setParams(Object params) {
		this.params = params;
	}


	public String getQueryStartTime() {
		return queryStartTime;
	}

	public void setQueryStartTime(String queryStartTime) {
		this.queryStartTime = queryStartTime;
	}

	public String getQueryEndTime() {
		return queryEndTime;
	}

	public void setQueryEndTime(String queryEndTime) {
		this.queryEndTime = queryEndTime;
	}
}
